package cn.com.qtgl.apis.iam.model.input;

import cn.com.qtgl.apis.builtin.model.vo.Department;
import cn.melonlib.cores.commons.model.entity.ApiEntity;
import cn.melonlib.cores.commons.model.entity.StringIdEntity;
import cn.melonlib.cores.model.anno.ModelComment;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.beans.BeanUtils;

import java.util.List;

@Data
@EqualsAndHashCode(callSuper = true)
@ModelComment("部门输入")
public class DepartmentInput extends StringIdEntity implements ApiEntity {

    public DepartmentInput() {
    }
    public DepartmentInput(Department department){
        BeanUtils.copyProperties(department,this);
    }

    @ModelComment("部门名称")
    private String name;

    @ModelComment("部门代码")
    private String code;

    @ModelComment("父级部门")
    private String parent;

    @ModelComment("标签")
    private String tags;

    @ModelComment("是否独立部门")
    private Boolean independent;

    @ModelComment("部门描述")
    private String description;

    @ModelComment("部门级别类型")
    private String treeType;


    @ModelComment("部门类别")
    private String type;

    @ModelComment("是否启用")
    private Boolean active;

    @ModelComment("排序")
    private Integer index;

    @ModelComment("来源")
    private String source;

    @ModelComment("部门扩展信息")
    private List<DynamicValueInput> attrsValues;

    @ModelComment("英文名称")
    private String deptEnName;

    @ModelComment("部门缩写")
    private String abbreviation;

    @ModelComment("关联关系类型")
    private String relationType;

    @ModelComment("办公地址")
    private List<String> jointOffice;

    @ModelComment("相关部门")
    private List<DeptRelationInput> deptRelations;

}
